import { request } from 'umi';


/**
 * 获取提现申请列表
 */
export async function getUserExtract(params) {
	return request('/api/admin/user_extract', {
		method: 'GET',
		params
	});
}

/**
 * 获取提现申请列表卡片数据
 */
export async function getTotalPrice(params) {
	return request('/api/admin/user_extract/totalPrice', {
		method: 'GET',
		params
	});
}

/**
 * 编辑 api
 */
export async function putEdit(id,data) {
	return request(`/api/admin/user_extract/${id}`, {
		method: 'PUT',
		data
	});
}

/**
 * 资金记录表
 */
export async function getCapital(params) {
	return request('/api/admin/user_bills', {
		method: 'GET',
		params
	});
}

/**
 * 发票记录表
 */
export async function getUserInvoice(params) {
	return request('/api/admin/user_invoice', {
		method: 'GET',
		params
	});
}

/**
 * 发票订单详情
 */
export async function getInvoiceOrderDetail(id) {
	return request(`/api/admin/user_invoice/${id}`, {
		method: 'GET',
	});
}


/**
 * 充值记录表
 *
 */
export async function getRecharges(params) {
	return request('/api/admin/user_recharges', {
		method: 'GET',
		params
	});
}

/**
 * 充值记录总金额
 *
 */
export async function getRechargesAllPrice(params) {
	return request('/api/admin/user_recharges/totalPrice ', {
		method: 'GET',
		params
	});
}

/**
 * 删除充值记录
 *
 */
export async function deleteRechargeRecord(id) {
	return request(`/api/admin/user_recharges/${id}`, {
		method: 'DELETE',
	});
}

/**
 * 查询佣金记录列表的路由
 *
 */
export async function getCommissionRecord(params) {
	return request('/api/admin/brokerage_frozen', {
		method: 'GET',
		params
	});
}

/**
 * 查询佣金记录详情中用户的信息
 *
 */
export async function getCommissionDetail(id) {
	return request(`/api/admin/brokerage_frozen/user/${id}`, {
		method: 'GET',
	});
}

/**
 * 获取佣金详情中的列表的路由
 *
 */
export async function getCommissionList(id,data) {
	return request(`/api/admin/brokerage_frozen/${id}`, {
		method: 'GET',
		data
	});
}
